class Vehicle:
    def __init__(self, name):
        self._name = name

    def run(self):
        print('交通工具', self._name, '正在行驶')

    def run_info(self):
        print('名称：', self._name)


class Truck(Vehicle):
    def __init__(self, name, weight):
        super().__init__(name)
        self._weight = weight

    def run(self):
        print('卡车', self._name, '载重', self._weight, '正在行驶')

    def run_info(self):
        print('名称:', self._name, '载重:', self._weight)


class Train(Vehicle):
    def __init__(self, name, num):
        super().__init__(name)
        self._num = num

    def run(self):
        print('火车', self._name, '车厢个数', self._num, '正在行驶')

    def run_info(self):
        print("名称:", self._name, '车厢个数:', self._num)


def Run_info(vehicle):
    vehicle.run_info()


t = Truck('东风牌', 15)
T = Train('和谐号', 12)
t.run()
T.run()
Run_info(t)
Run_info(T)
